Optimal. Leaf size=193 \[ \frac {(c+d \tan (e+f x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {c+d \tan (e+f x)}{c-i d}\right )}{4 a f (n+1) (d+i c)}+\frac {(i c+2 d n-d) (c+d \tan (e+f x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {c+d \tan (e+f x)}{c+i d}\right )}{4 a f (n+1) (c+i d)^2}-\frac {(c+d \tan (e+f x))^{n+1}}{2 f (-d+i c) (a+i a \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.28, antiderivative size = 193, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3552, 3539, 3537, 68} \[ \frac {(c+d \tan (e+f x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {c+d \tan (e+f x)}{c-i d}\right )}{4 a f (n+1) (d+i c)}+\frac {(i c+2 d n-d) (c+d \tan (e+f x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {c+d \tan (e+f x)}{c+i d}\right )}{4 a f (n+1) (c+i d)^2}-\frac {(c+d \tan (e+f x))^{n+1}}{2 f (-d+i c) (a+i a \tan (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 68
Rule 3537
Rule 3539
Rule 3552
Rubi steps
\begin {align*} \int \frac {(c+d \tan (e+f x))^n}{a+i a \tan (e+f x)} \, dx &=-\frac {(c+d \tan (e+f x))^{1+n}}{2 (i c-d) f (a+i a \tan (e+f x))}+\frac {\int (c+d \tan (e+f x))^n (a (i c-d (1-n))-i a d n \tan (e+f x)) \, dx}{2 a^2 (i c-d)}\\ &=-\frac {(c+d \tan (e+f x))^{1+n}}{2 (i c-d) f (a+i a \tan (e+f x))}+\frac {\int (1+i \tan (e+f x)) (c+d \tan (e+f x))^n \, dx}{4 a}+\frac {(c+i d (1-2 n)) \int (1-i \tan (e+f x)) (c+d \tan (e+f x))^n \, dx}{4 a (c+i d)}\\ &=-\frac {(c+d \tan (e+f x))^{1+n}}{2 (i c-d) f (a+i a \tan (e+f x))}+\frac {i \operatorname {Subst}\left (\int \frac {(c-i d x)^n}{-1+x} \, dx,x,i \tan (e+f x)\right )}{4 a f}-\frac {(i (c+i d (1-2 n))) \operatorname {Subst}\left (\int \frac {(c+i d x)^n}{-1+x} \, dx,x,-i \tan (e+f x)\right )}{4 a (c+i d) f}\\ &=\frac {\, _2F_1\left (1,1+n;2+n;\frac {c+d \tan (e+f x)}{c-i d}\right ) (c+d \tan (e+f x))^{1+n}}{4 a (i c+d) f (1+n)}+\frac {(i c-d (1-2 n)) \, _2F_1\left (1,1+n;2+n;\frac {c+d \tan (e+f x)}{c+i d}\right ) (c+d \tan (e+f x))^{1+n}}{4 a (c+i d)^2 f (1+n)}-\frac {(c+d \tan (e+f x))^{1+n}}{2 (i c-d) f (a+i a \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 30.70, size = 0, normalized size = 0.00 \[ \int \frac {(c+d \tan (e+f x))^n}{a+i a \tan (e+f x)} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.55, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{n} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (d \tan \left (f x + e\right ) + c\right )}^{n}}{i \, a \tan \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.49, size = 0, normalized size = 0.00 \[ \int \frac {\left (c +d \tan \left (f x +e \right )\right )^{n}}{a +i a \tan \left (f x +e \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^n}{a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {i \int \frac {\left (c + d \tan {\left (e + f x \right )}\right )^{n}}{\tan {\left (e + f x \right )} - i}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________